DXL restoreProject is circumnavigating user permissions ???

I've got a bit of a dxl project setup code.

This will let ANYONE set up a project, regardless of their permissions.

Have i done something strange, or have I just found an exploit in DOORS?
 

// 
 
/*
*/
 
string message
 
// CLP - Set the current folder to be the database root
current = folder "/"
 
void ProjectTemp(DB fieldBox) 
{
    string projname = get zip 
        string projdesc = get description
        if (isValidName projname)
        {
//        string template = getenv("Home")
        string template = "//server/folder/archive.dpa"
        
                string message = restoreProject(template, projname, projdesc)
                
                if (length(message)>8)
                {
                        if(message[0:8] == "duplicate") 
                        {
                                infoBox "This Project name is already used in Database"
                        }
                        else if(message[0:18] == "Insufficient access")
                        {
                                infoBox "You have insufficient access to create a new project. \nPlease contact your DOORS Administrator for assistance."
                        }
                }
                else
                {
                        release fieldBox
                } 
        }
        else
        {
                infoBox "You have requested an invalid project name."
        }
        refreshDBExplorer()
        return
}
 
apply(fieldBox, "OK", ProjectTemp)
block fieldBox 
destroy fieldBox
fieldBox = null

liamc - Wed May 05 08:29:03 EDT 2010

Re: DXL restoreProject is circumnavigating user permissions ???
liamc - Wed May 05 08:30:56 EDT 2010

note the above has the initial dialog box stuff stripped out.

Re: DXL restoreProject is circumnavigating user permissions ???
llandale - Wed May 05 12:13:44 EDT 2010

In the old days: I have database1 with user 'Honest' with UniqueID 4 RMCDA access to the project, which I archive. In database2 I have user 'Spy' with, coincedenatally, UniqueID 4. The Project is Restored. Now the 'Spy' has full RMDCA access and 'Honest' has none. This is because the AccessRecords don't record the Name, but record the UniqueID of the user or group, and these were not reset.

Now, beginning v8.0 I think, AccessRecords are erased in archives and everything is 'Inherited'; I presume that's done when Archiving and not when Restoring.

Preserving the access rights only makes sense when the two databases have the same exact User database; which pretty much only happens when its restored in the SAME database. Perhaps that would make sense; preserve access rights when restoring if it came from the same database. Even that may have pit-falls, as the rights may have changed during the two months the project was archived.

Yup, you need to restore your access rights; the lesser of 3 weavols. Cannot help you there.

  • Louie

Maybe I should write some script to attempt to restore accesses, based on name, for archives. Let me think: the 'Get' script plows through everything looking for 'Specific' access and stores to a file: folder names, module names, object AbsNo, view names, attr Defs/Values/Types, name, id, and rights. the 'Put' script plows through the existing database, and for everthing therein if it finds an exact match it sets the thing to Specific with those exact rights. Missing rights in the Get text file are recorded. Glorified, the user can enter 'Matching' options, where perhaps the old user 'Honest' is matched with a new user 'Very Honest'; or old module A1 is really new module A1a. However, it may be easier to just edit and mass replace such text in the Get file.

Re: DXL restoreProject is circumnavigating user permissions ???
Mathias Mamsch - Wed May 05 14:00:52 EDT 2010

Are you sure, that you tried restoring the DPA file with a user that has not the "Can Create Projects" power? This is not an access issue, but a power that is assigned to the user in the "Manage User" dialog. Without trying I would suspect, that this will not work if the user does not have the right to create projects. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DXL restoreProject is circumnavigating user permissions ???
liamc - Wed May 05 16:33:09 EDT 2010

Prior to 9.2 DOORS would not let a user use the dxl function restoreProject, if not it would return an error (which you might be able to see being returned as a message in the above script).

In 9.2, it seems, from trying several times in several databases using several accounts, that ALL users can use restoreProject. (Despite the fact that "create new project" is greyed out in the menu for the users.)

This is not good.

Re: DXL restoreProject is circumnavigating user permissions ???
llandale - Thu May 06 16:00:18 EDT 2010

liamc - Wed May 05 16:33:09 EDT 2010
Prior to 9.2 DOORS would not let a user use the dxl function restoreProject, if not it would return an error (which you might be able to see being returned as a message in the above script).

In 9.2, it seems, from trying several times in several databases using several accounts, that ALL users can use restoreProject. (Despite the fact that "create new project" is greyed out in the menu for the users.)

This is not good.

I see that in v8.1, a user with Custom powers of only 'Archive Data', specifically not 'create projects', can indeed create a project with restoreProject(). This behavior is the same for v9.1. I see in the v8.1 and v9.1 GUI, the archive and restore options are greyed out for this same user.

I see that when I first attempted v8.1, it would fail to 'restore' giving error 'Archive filename extension invalid'; which turns out to be because I was attempting to restore a v9.1 project in a v8.1 database; bad error message. It worked for a v8.1 archive however.

I see a user cannot 'restore' unless they posses 'C'reate rights to the folder they are in, producing error 'Insufficient access to restore to this location'.

I see no change in behavior.

  • Louie